Optimal. Leaf size=66 \[ \frac{a^2 \log \left (a+b \tanh ^2(c+d x)\right )}{2 b^2 d (a+b)}+\frac{\log (\cosh (c+d x))}{d (a+b)}-\frac{\tanh ^2(c+d x)}{2 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11458, antiderivative size = 66, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {3670, 446, 72} \[ \frac{a^2 \log \left (a+b \tanh ^2(c+d x)\right )}{2 b^2 d (a+b)}+\frac{\log (\cosh (c+d x))}{d (a+b)}-\frac{\tanh ^2(c+d x)}{2 b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3670
Rule 446
Rule 72
Rubi steps
\begin{align*} \int \frac{\tanh ^5(c+d x)}{a+b \tanh ^2(c+d x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^5}{\left (1-x^2\right ) \left (a+b x^2\right )} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac{\operatorname{Subst}\left (\int \frac{x^2}{(1-x) (a+b x)} \, dx,x,\tanh ^2(c+d x)\right )}{2 d}\\ &=\frac{\operatorname{Subst}\left (\int \left (-\frac{1}{b}-\frac{1}{(a+b) (-1+x)}+\frac{a^2}{b (a+b) (a+b x)}\right ) \, dx,x,\tanh ^2(c+d x)\right )}{2 d}\\ &=\frac{\log (\cosh (c+d x))}{(a+b) d}+\frac{a^2 \log \left (a+b \tanh ^2(c+d x)\right )}{2 b^2 (a+b) d}-\frac{\tanh ^2(c+d x)}{2 b d}\\ \end{align*}
Mathematica [A] time = 0.160528, size = 60, normalized size = 0.91 \[ -\frac{-\frac{a^2 \log \left (a+b \tanh ^2(c+d x)\right )}{b^2 (a+b)}-\frac{2 \log (\cosh (c+d x))}{a+b}+\frac{\tanh ^2(c+d x)}{b}}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.018, size = 93, normalized size = 1.4 \begin{align*} -{\frac{ \left ( \tanh \left ( dx+c \right ) \right ) ^{2}}{2\,bd}}-{\frac{\ln \left ( \tanh \left ( dx+c \right ) +1 \right ) }{d \left ( 2\,b+2\,a \right ) }}+{\frac{{a}^{2}\ln \left ( a+b \left ( \tanh \left ( dx+c \right ) \right ) ^{2} \right ) }{2\,{b}^{2} \left ( a+b \right ) d}}-{\frac{\ln \left ( \tanh \left ( dx+c \right ) -1 \right ) }{d \left ( 2\,b+2\,a \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.57601, size = 180, normalized size = 2.73 \begin{align*} \frac{a^{2} \log \left (2 \,{\left (a - b\right )} e^{\left (-2 \, d x - 2 \, c\right )} +{\left (a + b\right )} e^{\left (-4 \, d x - 4 \, c\right )} + a + b\right )}{2 \,{\left (a b^{2} + b^{3}\right )} d} + \frac{d x + c}{{\left (a + b\right )} d} + \frac{2 \, e^{\left (-2 \, d x - 2 \, c\right )}}{{\left (2 \, b e^{\left (-2 \, d x - 2 \, c\right )} + b e^{\left (-4 \, d x - 4 \, c\right )} + b\right )} d} - \frac{{\left (a - b\right )} \log \left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}{b^{2} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 3.05674, size = 1817, normalized size = 27.53 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 39.4481, size = 425, normalized size = 6.44 \begin{align*} \begin{cases} \tilde{\infty } x \tanh ^{3}{\left (c \right )} & \text{for}\: a = 0 \wedge b = 0 \wedge d = 0 \\\frac{x - \frac{\log{\left (\tanh{\left (c + d x \right )} + 1 \right )}}{d} - \frac{\tanh ^{4}{\left (c + d x \right )}}{4 d} - \frac{\tanh ^{2}{\left (c + d x \right )}}{2 d}}{a} & \text{for}\: b = 0 \\\frac{4 d x \tanh ^{2}{\left (c + d x \right )}}{2 b d \tanh ^{2}{\left (c + d x \right )} - 2 b d} - \frac{4 d x}{2 b d \tanh ^{2}{\left (c + d x \right )} - 2 b d} - \frac{4 \log{\left (\tanh{\left (c + d x \right )} + 1 \right )} \tanh ^{2}{\left (c + d x \right )}}{2 b d \tanh ^{2}{\left (c + d x \right )} - 2 b d} + \frac{4 \log{\left (\tanh{\left (c + d x \right )} + 1 \right )}}{2 b d \tanh ^{2}{\left (c + d x \right )} - 2 b d} - \frac{\tanh ^{4}{\left (c + d x \right )}}{2 b d \tanh ^{2}{\left (c + d x \right )} - 2 b d} + \frac{2}{2 b d \tanh ^{2}{\left (c + d x \right )} - 2 b d} & \text{for}\: a = - b \\\frac{x \tanh ^{5}{\left (c \right )}}{a + b \tanh ^{2}{\left (c \right )}} & \text{for}\: d = 0 \\\frac{a^{2} \log{\left (- i \sqrt{a} \sqrt{\frac{1}{b}} + \tanh{\left (c + d x \right )} \right )}}{2 a b^{2} d + 2 b^{3} d} + \frac{a^{2} \log{\left (i \sqrt{a} \sqrt{\frac{1}{b}} + \tanh{\left (c + d x \right )} \right )}}{2 a b^{2} d + 2 b^{3} d} - \frac{a b \tanh ^{2}{\left (c + d x \right )}}{2 a b^{2} d + 2 b^{3} d} + \frac{2 b^{2} d x}{2 a b^{2} d + 2 b^{3} d} - \frac{2 b^{2} \log{\left (\tanh{\left (c + d x \right )} + 1 \right )}}{2 a b^{2} d + 2 b^{3} d} - \frac{b^{2} \tanh ^{2}{\left (c + d x \right )}}{2 a b^{2} d + 2 b^{3} d} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.26656, size = 190, normalized size = 2.88 \begin{align*} \frac{a^{2} \log \left (a e^{\left (4 \, d x + 4 \, c\right )} + b e^{\left (4 \, d x + 4 \, c\right )} + 2 \, a e^{\left (2 \, d x + 2 \, c\right )} - 2 \, b e^{\left (2 \, d x + 2 \, c\right )} + a + b\right )}{2 \,{\left (a b^{2} d + b^{3} d\right )}} - \frac{d x + c}{a d + b d} - \frac{{\left (a - b\right )} \log \left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}{b^{2} d} + \frac{2 \, e^{\left (2 \, d x + 2 \, c\right )}}{b d{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]